<!-- 明细详情 -->
<template>
  <publicPage bgColor="#FFFFFF">
    <view class="disFlxCC py-40">
        <view>{{ findType(info.type) }}</view>
        <view class="fz-18 fw-6 pt-13" :class="info.pm == 1 ? 'colororg' : 'colorred'">{{ info.pm == 1 ? '+' : '-' }}{{info.number || 0}}</view>
    </view>
    <u-cell size="large" title="类型" :border="false" :value="findType(info.type)" :titleStyle="{fontSize: '28rpx'}"></u-cell>
    <u-cell size="large" title="时间" :border="false" :value="info.createTime" :titleStyle="{fontSize: '28rpx'}"></u-cell>
    <u-cell size="large" title="交易单号" :border="false" :value="info.playNo || '-'" :titleStyle="{fontSize: '28rpx'}"></u-cell>
    <u-cell size="large" title="余额" :border="false" :value="info.balance+'云豆'" :titleStyle="{fontSize: '28rpx'}"></u-cell>
    <u-cell size="large" title="状态" :border="false" :titleStyle="{fontSize: '28rpx'}" v-if="info.type == 8">
      <view slot="value" class="colorred">
        {{info.status  == 0 ? '审核中' : (info.status  == 2 ? '审核不通过' : '提现成功')}}
      </view>
    </u-cell>
  </publicPage>
</template>

<script>
export default {
  data() {
    return {
      info: {},
      typeList: [
        {
          value: 1,
          label: '即时咨询'
        },
        {
          value: 2,
          label: '预约咨询'
        },
        {
          value: 3,
          label: '充值'
        },
        {
          value: 8,
          label: '提现'
        },
        {
          value: 10,
          label: '退款'
        },
        {
          value: 11,
          label: '服务项目'
        }
      ]
    };
  },
  onLoad() {
    this.info = JSON.parse(JSON.stringify(this.$store.state.sessionObj))
    this.$store.commit("SET_SESSIONOBJ", {});
  },
  methods: {
    findType(type){
      const obj = this.typeList.find(v=> v.value == type)
      return obj ? obj.label : ''
    },
  }
};
</script>
<style lang='scss' scoped>
.colorred {
    color: #ff6b6b;
}
.colororg {
    color: #c5a028;
}
</style>